package com.zff.rental.vo.dict;

import com.zff.rental.entity.dict.KeyValueDict;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class KeyValueDictIdParams {
    /**
     * 字典类型
     * 1:房型：一室、一室一厅
     * 2:经营区域：松岗、沙井
     */
    @NotNull(message = "字典类型不能为空")
    private Integer type;

    /**
     * 字典key
     */
    @NotEmpty(message = "字典key不能为空")
    private String dictKey;

    public KeyValueDict.MId toEntityId() {
        return new KeyValueDict.MId(type, dictKey);
    }
}
